package com.sfx.other.Demo;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: sfx
 * Date: 2023-09-09
 * Time: 17:10
 */
public class Singleton<T> {
    private  T instance = null;
    public   T getInstance() {
        if(instance == null) {
            instance = (T) new Singleton<T>();
        }
        Class<Integer> integerClass = int.class;
        return instance;
    }

    public static void main(String[] args) throws ClassNotFoundException {
//        List<Object> list1 = new ArrayList<Object>();
//        List<String> list2 = new ArrayList<String>();
//        System.out.println(list1.getClass());
//        System.out.println(list2.getClass());
        Class<?> aClass = ClassLoader.getSystemClassLoader().loadClass("com.sfx.other.Demo.Singleton");
        System.out.println(aClass);
    }
}